package com.dance.spring.learn.jdbc.service;

import com.dance.spring.learn.jdbc.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional()
public class UserService {

    @Autowired
    private UserDao userDao;

    public void accountMoney() {
        userDao.reduce();
        int i = 5 / 0;
        userDao.add();
    }

}
